﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UNSWThink
{
   /// <summary>
   /// Object that represents a IndividualAccount entry in the database
   /// </summary>
   public class IndividualAccount
   {
      private int id;
      private string userName;
      private string password;
      private AccountType accType;
      private string givenName;
      private string familyName;

      /// <summary>
      /// Default constructor
      /// </summary>
      public IndividualAccount()
      {
         id = 0;
         userName = String.Empty;
         password = String.Empty;
         accType = AccountType.OTH;
         givenName = String.Empty;
         familyName = String.Empty;
      }

      /// <summary>
      /// Alternate constructor
      /// </summary>
      /// <param name="id">
      /// ID of the record
      /// </param>
      /// <param name="userName">
      /// Username required to access this account
      /// </param>
      /// <param name="password">
      /// Password required to access this account
      /// </param>
      /// <param name="accType">
      /// The type that this individual is classified as
      /// </param>
      /// <param name="givenName">
      /// Given name of the individual
      /// </param>
      /// <param name="familyName">
      /// Family name of the individual
      /// </param>
      public IndividualAccount(int id, string userName, string password, AccountType accType, string givenName, string familyName)
      {
         this.id = id;
         this.userName = userName;
         this.password = password;
         this.accType = accType;
         this.givenName = givenName;
         this.familyName = familyName;
      }

      /// <summary>
      /// Gets or sets the ID
      /// </summary>
      public int ID
      {
         get
         {
            return ID;
         }
         set
         {
            ID = value;
         }
      }

      /// <summary>
      /// Gets or sets the username
      /// </summary>
      public string UserName
      {
         get
         {
            return userName;
         }
         set
         {
            userName = value;
         }
      }

      /// <summary>
      /// Gets or sets the password
      /// </summary>
      public string Password
      {
         get
         {
            return password;
         }
         set
         {
            password = value;
         }
      }

      /// <summary>
      /// Gets or sets the account type
      /// </summary>
      public AccountType Type
      {
         get
         {
            return accType;
         }
         set
         {
            accType = value;
         }
      }

      /// <summary>
      /// Gets or sets the given name
      /// </summary>
      public string GivenName
      {
         get
         {
            return givenName;
         }
         set
         {
            givenName = value;
         }
      }

      /// <summary>
      /// Gets or sets the family name
      /// </summary>
      public string FamilyName
      {
         get
         {
            return familyName;
         }
         set
         {
            familyName = value;
         }
      }
   }
}
